<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<div class="modal fade" role="dialog" tabIndex="-1" id="modal_dialog"
		aria-labelledby="modal_label" aria-hidden="true"
		data-backdrop="static"
		th:fragment="showModalDialog(dialogTitle, selectedItems, allItems)">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="modal_label" th:utext="${dialogTitle}">模态窗体标题</h4>
				</div>
				<div class="modal-body" id="modal_content_div"
					style="height: 360px; overflow-y: scroll">
					<ul class="list-group">
						<li class="list-group-item" th:each="item: ${allItems}"
							th:object="${item}"><label><input type="checkbox"
							th:value="*{roleId}" th:checked="${#lists.contains(selectedItems, item)}" />&nbsp;&nbsp;<span th:utext="*{roleName}"></span></label></li>
					</ul>
				</div>
				<div id="" class="modal-footer">
					<button type="button" class="btn btn-default btn-sm"
						data-dismiss="modal" title="关闭窗体，不保存操作">关闭</button>
					<button type="button" class="btn btn-primary btn-sm"
						id="save_button" title="保存当前操作并关闭窗体">保存</button>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			$("#modal_dialog").on("hidden.bs.modal", function(e) {
				$("#modal_content_div").empty();
			});
		</script>
	</div>
</body>
</html>